import Vue from 'vue'
import VueRouter from 'vue-router'

import LoginView from "@/views/LoginView.vue";
import AppInfoView from "@/views/AppInfoView.vue";
import commonView from "@/views/CommonView.vue";
import AboutView from "@/views/AboutView.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  {
    path: '/appInfo',
    name: 'appInfo',
    component: commonView,
    children: [{path:'',component: AppInfoView}]
  },
  {
    path: '/about',
    name: 'about',
    component: commonView,
    children: [{path:'',component: AboutView}]
  },


  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
